Next | Prev | Up | Top | Contents | Index

Example 1

The following example lists the steps necessary to build a kernel and load a character device driver, called dlkm, using lboot:

  1. Add d to the dlkm master file:

    *FlagPrefixSoft#DevDependencies
    cddlkm382 

  2. Make sure that the cdevsw_extra kernel tuneable parameter allows for extra entries in the cdevsw table. The default settings in /var/sysgen/mtune/kernel are:

    cdevsw_extra233254

    The systune command also lists the current values of all of the tunable parameters. If the kernel is not configured to allow extra entries in the cdevsw table, use the systune command to change the cdevsw_extra parameter:

    # systune -i

    systune-> cdevsw_extra 3

    systune-> quit >

  3. Build a new kernel and boot the target system with the new kernel.

  4. Compile the dlkm.c driver:

    # cc -non_shared -coff -G0 -r -d -Wc,-jalr -c dlkm.c

  5. Copy dlkm.o to /var/sysgen/boot.

  6. Load the driver into the kernel:

    # lboot -L dlkm

  7. List the currently loaded modules to verify that the module is loaded:

    # lboot -V



Next | Prev | Up | Top | Contents | Index